#ifndef HDFS_CLIENT_H
#define HDFS_CLIENT_H

#include <string>
#include <fstream>

class HdfsClient
{
    public:
    HdfsClient(std::string  ip, int port);
    ~HdfsClient();

public:
    bool Ok();
    bool UploadFile(const std::string& path, const std::string &filePath);
    bool UploadContent(const std::string& path, const std::string& content);
    bool DownloadFile(const std::string& path, const std::string &filePath);
    bool DownloadContent(const std::string& path, std::string& content);
    bool DeleteFile(const std::string& path);

private:
    static std::string CheckPath(const std::string& path);

private:
    std::string ip;
    int port;
};


#endif //HDFS_CLIENT_H
